<?php
$this->load->view('common/header',
array(
  'title' =>'店铺列表'
));
$this->load->view('common/sliderbar',
array(
  'menu'   => 'shop',
  'option' => 'shoplist'
));
 ?>
	<link rel="stylesheet" href="../public/css/shop/shop_list.css" />
	<div class="main-content">
		<div class="breadcrumbs" id="breadcrumbs">
			<ul class="breadcrumb">
				<li>
					<a>店铺管理</a>
				</li>
			</ul>
		</div>
		<div class="menu-box">
      <div class="button-zone">
        <form class="form-search" style="width:300px;display:block;float:left" action="/shop/shop_list" post="get">
          <div class="input-group">
            <input type="text" class="form-control search-query" name="search" placeholder="请输入关键字" <?php if(!empty($_GET[ 'search'])){echo 'value="'.$_GET[ 'search']. '"';} ?> />
            <span class="input-group-btn">
            <input type="submit"  class="btn btn-info btn-sm" value="搜索">
            </span>
          </div>
        </form>
			<!-- <a href="/shop/shopexcel">导出所有店铺信息</a> -->
			<button type="button" class="btn btn-sm btn-primary" onclick="window.location.href='/shop/shopexcel?search=<?php if(!empty($_GET['search'])){echo $_GET['search'];} ?>'"><i class="icon-cloud-download bigger-125"></i>导出到Excel</button>
			<button type="button" class="btn btn-sm btn-primary"><i class="icon-cloud-download bigger-125"></i>导入店铺</button>
			</div>
      <ul class="page-zone pagination">
        <?php echo $this->pagination->create_links() ?>
      </ul>
		</div>
		<div class="row">
			<div class="table-responsive">
				<table id="sample-table-1" class="table table-striped table-bordered table-hover">
					<thead>
						<tr>
							<th>编号</th>
							<th>店名</th>
							<th style="min-width:60px;">老板娘</th>
							<th>联系电话</th>
							<th style="min-width:90px;">合作品牌</th>
							<th style="min-width:110px;">其他公司品牌</th>
							<th style="min-width:60px;">收货人</th>
							<th>收货人电话</th>
							<th>地址</th>
							<th class="center" style="min-width:50px;">操作</th>
						</tr>
					</thead>
					<tbody>
						<?php foreach ($shop_list as $shop_list): ?>
						<tr>
							<td class="J_shopid"><?php echo $shop_list['shopid'] ?></td>
							<td class="J_shopname"><?php echo $shop_list['shopname'] ?></td>
							<td class="J_shopboss"><?php echo $shop_list['shopboss'] ?></td>
							<td class="J_shoptel"><?php echo $shop_list['shoptel'] ?></td>
							<td class="J_shopbrand"><?php echo $shop_list['shopbrand'] ?></td>
							<td class="J_shopotherbrand"><?php echo $shop_list['shopotherbrand'] ?></td>
							<td class="J_shopconsignee"><?php echo $shop_list['shopconsignee'] ?></td>
							<td class="J_shopctel"><?php echo $shop_list['shopctel'] ?></td>
							<td class="J_shopaddr"><?php echo $shop_list['shopaddr'] ?></td>
							<td class="center"><a href="/shop/shop_detail?shopid=<?php echo $shop_list['shopid'] ?>">详情</a></td>
            </tr>
						<?php endforeach; ?>
					</tbody>
				</table>
			</div>
		</div>
	</div>
	<script src="../public/js/shop/shop_list.js"></script>
	<?php
$this->load->view('common/footer');
?>
